package com.devunion.bogdan.view.model;

import javax.swing.*;

public class ZoomComboBoxModel extends DefaultComboBoxModel {
    public ZoomComboBoxModel() {
        super(new ZoomRatio[] {
                new ZoomRatio(50),
                new ZoomRatio(100),
                new ZoomRatio(250),
                new ZoomRatio(500)
        });
    }

    public static class ZoomRatio {
        private String label;
        private int zoom;

        private ZoomRatio(int zoom) {
            this.zoom = zoom;
            this.label = zoom + "%";
        }

        public String getLabel() {
            return label;
        }

        public int getZoom() {
            return zoom;
        }

        @Override
        public String toString() {
            return label;
        }
    }
}
